<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of personal_model
 *
 * @author Neil
 */
class personal_model extends CI_Model {

    public function tiposPersonal() {
        $query = $this->db->query('select id_tipo as codigo, desc_tipo as descripcion from tipo_personal');
        if ($query->num_rows() > 0) {
            foreach ($query->result() as $fila) :
                $data[] = $fila;
            endforeach;
        }
        return $data;
    }

    public function Personal() {
        $query = $this->db->get('personal');
        if ($query->num_rows() > 0) {
            foreach ($query->result() as $fila) :
                $data[] = $fila;
            endforeach;
        }
        return $data;
    }

}

?>
